#include "Singleton.h"



class iTest
{
public:
	iTest()
	{
		_icount++;
	}
	~iTest()
	{

	}

	static int getTickCount()
	{
		return _icount;
	}

private:
	static int		_icount;
};

int iTest::_icount = 0;

int main()
{
	//Singleton i1 = Singleton.getInstance();
	//Singleton i2 = i1;
	
	//Singleton<iTest> *i = new Singleton<iTest>();
	iTest a = Singleton<iTest>::getInstance();
	iTest b = Singleton<iTest>::getInstance();
	//iTest i1 = a.getInstance();
	cout<<a.getTickCount()<<"   "<<b.getTickCount()<<endl;
	iTest* i2 = new iTest();
	cout<<i2->getTickCount()<<endl;
	cin.get();

	delete i2;
	return 0;
	
}